package com.zjitc.p1.config;

import com.zjitc.p1.obj.Teacher;
import com.zjitc.p1.obj.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * Created by lenovo on 2018/3/14.
 */
@Configuration
@ImportResource(locations = {"classpath:spring-configuration2.xml"})
public class JavaConfiguration2 {

    @Bean
    public User user(Teacher teacher){
        return new User(teacher);
    }
}
